import { Router } from 'react-router-dom';

export namespace Axios {
  // * 请求响应参数(不包含data)
  export interface Result {
    code: string;
    msg: string;
  }

  // * 请求响应参数(包含data)
  export interface ResultData<T = any> extends Result {
    data: T;
  }
}

export namespace LoginS {
  export interface loginData {
    emplNumber: string;
    pemplwd: string;
  }
  export interface ResLogin {
    token: string;
    menus: any;
  }
}

export namespace Router {
  export interface RouterProp {
    path: string;
    element: React.ReactElement;
    title?: string;
    icon?: string;
    display?: number;
    children?: RouterProp[];
  }
  export interface RouterCache {
    path: string;
    element: string;
    title?: string;
    icon?: string;
    display?: number;
    children?: RouterCache[];
  }
}

export interface Store {
  routerList: Router.RouterProp[];
  login(values: LoginS.loginData): Promise<any>;
  logout(): void;
}

export interface MenuSiderType {
  state: [];
}

export namespace Statistics {
  export interface Descriptions {
    look: string;
    place_order_person: string;
    orderNUm: string;
    place_order_goods: string;
    effective_order: string;
    order_money: string;
    refund_money: string;
    pay_person: string;
    pay_order: string;
    pay_goods: string;
    pay_money: string;
    unit_price: string;
  }
  export interface Echart {
    echartData: [];
  }
  export interface Table {
    tableData: [];
  }
}

export namespace Finance {
  export interface Order {
    orderData: {
      saleAmount: string;
      effectiveOrderNum: string;
      effectiveOrderAmount: string;
      invalidOrderNum: string;
      invalidOrderAmount: string;
      doneOderNum: string;
      doneOrderAmount: string;
    };
  }
  export interface Vip {
    vipData: {
      userNum: string;
      effectiveOrderUser: string;
      userOrderNum: string;
      userOderAmount: string;
      buyPercentage: string;
      averageOrderNum: string;
      averageBuy: string;
    };
  }
  export interface FinanceData {
    order: {
      saleAmount: string;
      effectiveOrderNum: string;
      effectiveOrderAmount: string;
      invalidOrderNum: string;
      invalidOrderAmount: string;
      doneOderNum: string;
      doneOrderAmount: string;
    };
    vip: {
      userNum: string;
      effectiveOrderUser: string;
      userOrderNum: string;
      userOderAmount: string;
      buyPercentage: string;
      averageOrderNum: string;
      averageBuy: string;
    };
  }
}

export namespace Authority {
  export interface RoleList {
    menuListAll: any[];
    roleMenus: any[];
  }
}
